package com.yima.baseproj.module.app.parent;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yima.baseproj.module.sys.parent.ParentEntity;
import org.springframework.stereotype.Service;

@Service
public class AppParentService extends ServiceImpl<AppParentMapper, ParentEntity> {

    /**
     * 通过 微信openid获取家长信息
     * @param parentVxId
     * @return
     */
    public ParentEntity findByVxId(String parentVxId){
        return baseMapper.selectOne(new QueryWrapper<ParentEntity>()
                        .eq("parent_vxid",parentVxId));
    }
}
